FROM gofera/centos7-rust-cxx:v1
COPY cargo_config /root/.cargo/config
RUN cargo install tauri-cli
RUN cargo install create-tauri-app
RUN yum install -y glib2
RUN yum install -y glib2-devel 
RUN yum install -y gtk3 gtk3-devel
RUN yum install -y libsoup-devel
RUN yum install -y webkitgtk3-devel
RUN wget https://rpmfind.net/linux/centos/7.9.2009/updates/x86_64/Packages/webkitgtk4-jsc-devel-2.28.2-3.el7.x86_64.rpm
RUN yum install -y webkitgtk4-jsc
RUN rpm -ivh webkitgtk4-jsc-devel-2.28.2-3.el7.x86_64.rpm 
RUN wget https://rpmfind.net/linux/centos/7.9.2009/updates/x86_64/Packages/webkitgtk4-devel-2.28.2-3.el7.x86_64.rpm
RUN rpm -ivh webkitgtk4-devel-2.28.2-3.el7.x86_64.rpm 
WORKDIR /usr/src/tauriwrap
COPY ui ui
COPY src-tauri src-tauri
RUN cd src-tauri && cargo fetch
RUN cargo tauri build || true
